<?php
defined('_JEXEC') or die('Restricted access');

class UserToolbarHelper {
    var $_user;
    var $_groups;
    
    var $_category;
    
    var $_db;

    function __construct($category) {
        $this->_db = JFactory::getDBO();
        $this->_user = JFactory::getUser();
        $this->_groups = $this->_getUserGroups();
    }
    
    function _getUserGroups {
        $query = 'select group_id from #__docario_group_member';
        $query .= ' where userid='.$this->_user->id;
        
        $this->_db->setQuery($query);
        return $this->_db->loadResultArray();
    }
}
